package com.knowif.backend.util;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author ：Xh
 * @date ：Created in 2019/8/26 0026 21:53
 */
@Component
public class RedisUtil {

    @Resource
    private StringRedisTemplate stringRedisTemplate;

    public boolean hasKey(String key){
        return stringRedisTemplate.hasKey(key);
    }

}
